package com.youlu.campus.web.jinshuju;

/**
 * @author : [dengbo]
 * @className : JinShujuRankController
 * @description : [金数据排行榜]
 * @createTime : [2023/6/19 17:01]
 */

import com.youlu.campus.entity.jinshuju.dto.JinUserRankDTO;
import com.youlu.campus.service.jinshuju.JinShuJuUserRankService;
import com.youlu.campus.web.common.base.RequestContext;
import com.yuelin.infrastructure.quantum.common.QResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : [dengbo]
 * @className : JinUserActivity
 * @description : [金数据用户活动控制器]
 * @createTime : [2023/6/13 16:36]
 */
@Slf4j
@RestController
public class JinShuJuRankController {

    @Autowired
    private JinShuJuUserRankService jinShuJuUserRankService;

    /**
     *  金数据用户排行榜
     * @param req
     * @return
     */
    @PostMapping("/mini-app/jin/user/ranking")
    public QResult activityProgress(@RequestBody JinUserRankDTO req){
        req.setUserId(RequestContext.getUserId());
        return QResult.success(jinShuJuUserRankService.getRankList(req));
    }
}
